1. Field of the Invention
The present invention relates generally to the detection of signals, such as dual tone multi-frequency (DTMF) coded signals, and more particularly, to reducing the complexity of a signal detector by swapping coefficients in the transform unit used to determine signal energies at targeted frequencies.
2. Description of the Related Art
DTMF is the signaling standard for the Touch Tone system. Two tones are combined to define a DTMF digit. Table 1 shows the matrix of frequencies used to encode the 16 DTMF symbols on a typical 4xc3x974 matrix telephone keypad. Each DTMF tone consists of two sine waves. One sine wave is from the low-frequency band (row frequency), and the other frequency is from the high-frequency band (column frequency).
Various methods have been used for DTMF generation and detection. Previously, analog circuitry had been used to generate and decode DTMF digits. More recently, the functions have been implemented using digital signal processors (DSP) to improve the accuracy, precision, stability, reprogrammability, and cast. A popular DSP algorithm for DTMF detection is the Goertzel algorithm. One such previous method is described in U.S. Pat. No. 5,644,634, issued to Zheng-yi Xie et al., entitled xe2x80x9cSystem and Method for Dual Tone Multifrequency Detection Using Variable Frame Widths,xe2x80x9d the specification of which is hereby incorporated by reference in its entirety.
In general, a DTMF detector examines the line or communication channel for the presence of two sinusoids using dedicated frequency domain algorithms, including modified Goertzel algorithms, DFT/FFTs, auto-correlation, zero crossing counting, and narrow band filter-based methods, among others.
A common technique for determining energy values in the frequency domain is performed by transforming the time domain sampling data to frequency domain data using a variant of the discrete Fourier transform (DFT) called the Goertzel algorithm. The transfer function for the Goertzel algorithm is:                                           H            k                    =                                    1              -                              ⅇ                                  j                  ⁢                                      xe2x80x83                                    ⁢                  2                  ⁢                                      xe2x80x83                                    ⁢                  π                  ⁢                                      xe2x80x83                                    ⁢                                      k                    N                                                                                      1              -                              c                ·                                  z                                      -                    1                                                              +                              z                                  -                  2                                                                    ,                            (        1        )            
where c is the Goertzel coefficient, c=2 cos   (      2    ⁢          xe2x80x83        ⁢    π    ⁢          xe2x80x83        ⁢          k      N        )
and N is the number of samples in a frame. The value of k is defined by:                               k          =                                    N                              F                s                                      ·                          F              tone                                      ,                            (        2        )            
where Fs is the sampling frequency (i.e., 8 kHz in typical telephone systems), Ftone is the frequency nearest the DTMF frequency that keeps the value of k to an integer. The energy of each DTMF frequency is calculated by the feed forward and feedback phase. The feedback phase is calculated as:
Q(n)=cxc2x7Q(nxe2x88x921)xe2x88x92Q(nxe2x88x922)+x(n),xe2x80x83xe2x80x83(3)
where Q(xe2x88x921)=Q(xe2x88x922)=0, n=0, 1, 2, . . . , Nxe2x88x921. Q(nxe2x88x921) and Q(nxe2x88x922) are feedback storage elements for a frequency point, and x(n) is the current input sample value. Q(n) is referred to as the delay value.
The energy in each DTMF frequency bin is calculated in the feedforward phase (i.e., n=N) by the equation:
E(dtmf)=Q2(nxe2x88x921)+Q2(nxe2x88x922)xe2x88x92Q(nxe2x88x921)xc2x7Q(nxe2x88x922)xc2x7c.xe2x80x83xe2x80x83(4)
After the energy of each DTMF frequency is calculated, the largest magnitude in each frequency band is compared to a threshold. If the energy in one of the bins exceeds the threshold, a DTMF tone is present.
In accordance with industry standards, a DTMF detector should detect a DTMF tone have less than 1.5% frequency distortion and reject a tone having more than 3.5% distortion. A commonly used twist test detects an energy variation due to an amplitude variation. The allowable energy difference between row and column frequencies for a given detection is between xe2x88x928 dB and 4 dB (i.e., amount of twist). The twist test is not effective in determining energy variations due to frequency distortion. For example, consider the case where the row frequency of Digit xe2x80x9c1xe2x80x9d varies by 3%. The energy of the row frequency drops by about 1 dB, but the twist test limits are still met. Current DTMF detectors have difficulty discriminating between energy variations due to frequency variation and those caused by amplitude variation, and accordingly, the frequency selectivity of the detector is reduced.
The present invention is directed to overcoming, or at least reducing the effects of, one or more of the problems set forth above.
One aspect of the present invention is seen in a signal detector including a transform unit and a post processing test unit. The transform unit is adapted to a transform unit adapted to receive at least first and second frames of input samples, determine a first plurality of energy values for the first frame based on a first set of transform coefficients, and determine a second plurality of energy values for the second frame based on a second set of transform coefficients. The post processing test unit is adapted to identify at least one target frequency based on the first plurality of energy values. The second set of transform coefficients is based on the target frequency, and the post processing unit is adapted to determine the presence of a first signal in the input samples based on the second plurality of energy values.
Another aspect of the present invention is seen in a method for detecting a signal. A first frame of input samples is received. A first set of transform coefficients is determined based on a first plurality of frequencies. A first plurality of energy values is determined based on the first set of transform coefficients. A target frequency is determined from the first plurality of frequencies based on the first plurality of energy values. A second set of transform coefficients is determined based on the target frequency. A second frame of input samples is received. A second plurality of energy values is determined based on the second set of transform coefficients. The presence of the signal in the input samples is determined based on the second plurality of energy values.